'use strict'
exports.main = async (event, context) => {
	console.log(event)
	//event为客户端上传的参数
	const { data } = uniCloud.request({
		method: 'GET',
		url: 'https://apis.map.qq.com/ws/direction/v1/driving',
		data: {
			key: 'JW3BZ-KSU6H-WHMDN-WI2SS-HD6CJ-B3FG2',
			from: event.from,
			to: event.to,
		},
	})
	//返回数据给客户端
	return data
}
